package atguigu.demo3

/**
  * Created by lzd on 2018/11/2.
  * set
  *
  */
object demo3_10 {
  def main(args: Array[String]): Unit = {
    var numberSet = Set(1, 2, 3)
    numberSet += 5 // Sets numberSet to the immutable set numberSet + 5
    numberSet

    Set(1, 2, 3) - 2

    Set(1, 2, 3) + 1

    // 无序访问
    for (x <- Set(1, 2, 3, 4, 5, 6)) print(x)
  }
}
